function stop() {
    local reslines=`ps aux | grep "dist/index" | grep -v "grep" | wc -l`
    ps aux | grep "dist/index" | grep -v "grep"
    echo "$reslines"
    if [ "$reslines" -lt 1 ]; then
        echo 'server is not running'
    else
        local pid=`ps aux  | grep "dist/index" | grep -v "grep" | awk '{print $2}'`
        kill -9 $pid
        echo "server stop done."
    fi
}


stop
